package com.javandad.app.client.fodos;

import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.AbsolutePanel;
import com.google.gwt.user.client.ui.FormPanel;
import com.google.gwt.user.client.ui.FileUpload;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.ClickEvent;

public class UploadFodosDialogBox extends DialogBox {

	/**
	 * @wbp.parser.constructor
	 */
	public UploadFodosDialogBox() {
		super();
		
		AbsolutePanel absolutePanel = new AbsolutePanel();
		setWidget(absolutePanel);
		absolutePanel.setSize("694px", "470px");
		
		final FormPanel formPanel = new FormPanel();
		formPanel.setEncoding(FormPanel.ENCODING_MULTIPART);
	    formPanel.setMethod(FormPanel.METHOD_POST);
		formPanel.setAction("http://127.0.0.1:33289/uploadimage");
				
		
		absolutePanel.add(formPanel, 215, 69);
		formPanel.setSize("380px", "202px");
		
		FileUpload fileUpload = new FileUpload();
		formPanel.setWidget(fileUpload);
		fileUpload.setSize("337px", "100%");
		
		Button btnSubmit = new Button("Submit");
		btnSubmit.addClickHandler(new ClickHandler() {
			public void onClick(ClickEvent event) {
				formPanel.submit();
			}
		});
		absolutePanel.add(btnSubmit, 488, 351);
		// TODO Auto-generated constructor stub
	}

	public UploadFodosDialogBox(boolean autoHide, boolean modal) {
		super(autoHide, modal);
		// TODO Auto-generated constructor stub
	}

	public UploadFodosDialogBox(boolean autoHide) {
		super(autoHide);
		// TODO Auto-generated constructor stub
	}
}
